package com.zxw.flow.api.toc;

import com.zxw.common.core.base.res.BaseRes;
import com.zxw.flow.domain.dto.toc.FilePathDTO;
import com.zxw.flow.domain.dto.toc.FlowPathTreeDTO;
import com.zxw.flow.domain.entity.toc.FilePath;
import com.zxw.flow.domain.vo.toc.FilePathVO;
import org.springframework.security.access.method.P;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author Xuewei.Zhang
 * @date 2022/9/15
 */
public interface FilePathApi {

    @GetMapping("/file-tree")
    BaseRes<List<FlowPathTreeDTO>> findFileTree();

    @GetMapping("/{id}")
    BaseRes<FilePathDTO> findFilePathById(@PathVariable("id") Long id);

    @PostMapping("/insert")
    BaseRes<FilePath> insertFilePath(@RequestBody FilePathVO filePathVO);

    @PostMapping("init-file-path/{userAccount}")
    BaseRes initFilePathData( @PathVariable("userAccount") String userAccount);

    @PutMapping("/update/{id}")
    BaseRes updateFilePath(@PathVariable("id") Long id, @RequestBody FilePathVO filePathVO);

    @DeleteMapping("/{id}")
    BaseRes deleteFilePath(@PathVariable("id") Long id);





}
